Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alertmanager support to backend target #2838

Merged
merged 3 commits into from
Aug 26, 2022

Conversation

pracucci
Copy link
Collaborator

What this PR does

In #2754 I've added the support for the experimental read-write deployment mode, excluding the Alertmanager. In this PR I'm adding the Alertmanager to the backend target.

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@colega colega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, easy :)

@@ -66,7 +66,7 @@ func checkDirectoriesReadWriteAccess(
if cfg.isAnyModuleEnabled(All, Ruler, Backend) {
errs.Add(errors.Wrap(checkDirReadWriteAccess(cfg.Ruler.RulePath, dirExistFn, isDirReadWritableFn), "ruler"))
}
if cfg.isAnyModuleEnabled(AlertManager) {
if cfg.isAnyModuleEnabled(AlertManager, Backend) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly related to this PR, but I think that at this point we need a cfg.isEnabledAnyModuleIncluding(AlertManager) that should solve the dependency tree. Otherwise all these changes are very error-prone.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. I tried to it few weeks ago and was slightly harder than I though, because we have the dependency tree after we run most of the code currently calling isAnyModuleEnabled(). So, it needs some refactoring. I will look again at it and open an issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pracucci pracucci enabled auto-merge (squash) August 26, 2022 07:35
@pracucci pracucci merged commit 5f68cad into main Aug 26, 2022
@pracucci pracucci deleted the add-alertmanager-support-to-backend-target branch August 26, 2022 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants